package com.flyme.module.file.client.api;


import com.flyme.common.core.model.ResultBody;
import com.flyme.common.core.model.query.PagerInfo;
import com.flyme.module.file.client.entity.SysOffCourse;
import org.springframework.web.bind.annotation.*;

/**
 * @author zyf
 */
@RequestMapping("/offcourse")
public interface SysOffCourseRemoteService {

    /**
     * 直播列表
     *
     * @return
     */
    @PostMapping("/list")
    ResultBody list(@ModelAttribute(value = "pagerInfo") PagerInfo pagerInfo, SysOffCourse offCourse);
    /**
     * 添加直播
     * @param live
     * @return
     */
    @PostMapping(value="/add")
    ResultBody add(@ModelAttribute(value = "live") SysOffCourse offCourse);
    /**
     * 根据ID查询直播详情
     * @param id
     * @return
     */
    @GetMapping(value = "/get/{id}")
    ResultBody get(@PathVariable String id);

    /**
     * 更新直播
     *
     * @param live
     * @return
     */
    @PostMapping("/edit")
    ResultBody edit(@ModelAttribute(value = "offCourse") SysOffCourse offCourse);
    /**
     * 删除直播
     *
     * @param ids
     * @return
     */
    @PostMapping(value="/delById")
    ResultBody delByIds(@RequestParam("ids") String[] ids);


    @PostMapping("/setOffCourseStatus")
    ResultBody setOffCourseStatus(@RequestParam("id") Long id, @RequestParam("courseStatus") Integer courseStatus);
    @PostMapping("/setOffCourseIndex")
    ResultBody setOffCourseIndex(@RequestParam("id") Long id, @RequestParam("recomIndex") Integer recomIndex);
    @PostMapping("/setApplyType")
    ResultBody setApplyType(@RequestParam("id") Long id, @RequestParam("applyType") Integer applyType);
}
